package com.tencent.welink.api.video;

import com.tencent.welink.api.OpenApiTokenChange;
import com.tencent.welink.api.base.WelinkOpenApi;
import com.tencent.welink.config.BussinessConfig;
import com.tencent.welink.util.CrontabUtil;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;

import java.util.Map;

/**
 * desc:获取本地录像
 * Created by junchihe on 2020/6/4.
 */
public class GetLocalStream extends WelinkOpenApi {
    private static final Logger log = LogManager.getLogger(GetLocalStream.class);

    public GetLocalStream() {
        super("/common/video/getLocalStream", true);
    }

    @Override
    public void displayResult(String result) {

    }

    public static void main(String[] args) {
        new BussinessConfig();
        CrontabUtil.addTaskInRate(new OpenApiTokenChange(), BussinessConfig.loginDurationMinutes, true);
        GetLocalStream getLocalStream = new GetLocalStream();
        Map<String, Object> map = getLocalStream.getExtendsPara();

        map.put("din", "300000000000070688");
        map.put("stream_id",0);
        map.put("timeBegin",System.currentTimeMillis()-7200000);
        map.put("length",30);

        getLocalStream.DoHttp();
        CrontabUtil.shutdown();
    }
}